#ifndef DEFINITIONS_H
#define DEFINITIONS_H

#include <OpenMesh/Core/IO/MeshIO.hh>
#include <OpenMesh/Core/Mesh/Attributes.hh>
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>

#include <QObject>
#include <QPair>

struct MyTraits : public OpenMesh::DefaultTraits
{
        // use vertex normals and vertex colors
        VertexAttributes( OpenMesh::Attributes::Normal |
                          OpenMesh::Attributes::Color );

        // use face normals
        FaceAttributes( OpenMesh::Attributes::Normal |
                        OpenMesh::Attributes::Color );

        // store the previous halfedge
        HalfedgeAttributes( OpenMesh::Attributes::PrevHalfedge );
};

typedef OpenMesh::TriMesh_ArrayKernelT<MyTraits>  MyMesh;


// BBox Structure
//
typedef struct
{
        OpenMesh::Vec3f min, max;

        float               diagonal() { return (min - max).norm(); }
        OpenMesh::Vec3f     center()   { return (min + max) * 0.5;  }

} BBox;



const double TRACKBALL_RADIUS = 0.6;


// Sets the amount of rotation to apply to the models
// each time an arrow key is pressed
//
const double ROTATION_DEGREES = 3;


#endif // DEFINITIONS_H
